import request from '@/config/axios'

export interface MatchmakerProductInfoVO {
  id: number
  no: string
  name: string
  supplyPrice: string
  matchmakerCover: string
  productIntroduct: string
  status: number
}

// 查询相亲红娘商品信息列表
export const getMatchmakerProductInfoPage = async (params) => {
  return await request.get({ url: `/maker/matchmaker-product-info/page`, params })
}

// 查询相亲红娘商品信息详情
export const getMatchmakerProductInfo = async (id: number) => {
  return await request.get({ url: `/maker/matchmaker-product-info/get?id=` + id })
}

// 新增相亲红娘商品信息
export const createMatchmakerProductInfo = async (data: MatchmakerProductInfoVO) => {
  return await request.post({ url: `/maker/matchmaker-product-info/create`, data })
}

// 修改相亲红娘商品信息
export const updateMatchmakerProductInfo = async (data: MatchmakerProductInfoVO) => {
  return await request.put({ url: `/maker/matchmaker-product-info/update`, data })
}

// 删除相亲红娘商品信息
export const deleteMatchmakerProductInfo = async (id: number) => {
  return await request.delete({ url: `/maker/matchmaker-product-info/delete?id=` + id })
}

// 导出相亲红娘商品信息 Excel
export const exportMatchmakerProductInfo = async (params) => {
  return await request.download({ url: `/maker/matchmaker-product-info/export-excel`, params })
}
